package com.mxpio.erp.common.purchase.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpio.erp.common.jpa.model.BizOrderLine;
import com.mxpio.erp.common.technology.entity.ItemGroup;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_PURC_BR_LINE")
@Schema(description="请购单行")
public class BuyRequestOrderLine extends BizOrderLine {
	private static final long serialVersionUID = 1L;


	@Column(name = "DRAWING_NO_")
	@Schema(description = "图号")
	private String drawingNo;

	@Column(name = "TRACKING_NO_")
	@Schema(description = "计划跟踪号")
	private String trackingNo;

	@Column(name = "SUGGEST_ORDER_DATE")
	@Schema(description = "建议下单日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date suggestOrderDate;

	@Column(name = "ARRIVE_DATE")
	@Schema(description = "需求到货日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date arriveDate;

	@Schema(description = "用途")
	@Column(name = "USAGE_")
	private String usage;

	@Schema(description = "备注")
	@Column(name = "MEMO_")
	private String memo;

	@Schema(description = "驳回原因")
	@Column(name = "REASON_")
	private String reason;

	@Column(name = "LINE_STATUS_")
	@Schema(description = "行状态")
	@Dict(dicCode = "ERP_BUY_REQ_LINE_STATUS")
	private String lineStatus;

	@Schema(description = "供应商编号")
	@Column(name = "PN_CODE_")
	private String pnCode;

	@Schema(description = "供应商名称")
	@Column(name = "PN_NAME_")
	private String pnName;

	@Transient
	private BuyRequestOrder buyRequestOrder;
}
